/*
 * @Author: 飞越疯人院 353362604@qq.com
 * @Date: 2022-09-22 09:44:20
 * @LastEditors: 飞越疯人院 353362604@qq.com
 * @LastEditTime: 2022-10-16 11:14:56
 * @FilePath: \adminstration\src\Common\Modal\ThrModalList\SampleEnclosure.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { commonTableList } from '../config'
import { BuiltInData } from '../config'

export const EnterpriseFiles = async ({ data }) => {
    let dataList = {
        url: 'EnterpriseFiles',
        uuid: data.uuid,
        type: '添加附件',
        width: 600,
        classification: 'FormModal',
        hideInSearch: true,
        pageSize: 10,
        params: {},
        added: 'posEnterpriseEnterpriseFiles',
        additional: { enterpriseUuid: data.uuid },
        columns: [
            { ...commonTableList.tableName, title: '文件名称', className: 'RemarkForm', width: 300 },
            {
                dataIndex: 'enterpriseFileCategory',
                title: '文件类型',
                valueType: 'select',
                valueEnum: BuiltInData.enterpriseFileCategory,
                rules: true,
                width: 350,
                className: 'RemarkForm',
            },
            {
                dataIndex: 'attachmentUuid',
                title: '文件附件',
                valueType: 'upload',
                valueFile: [2, 3],
                fileUrl: 'fileUrl',
                rules: true,
                hideInTable: true,
            },
            {
                dataIndex: 'fileUrl',
                title: '文件附件',
                valueType: 'hidden',
                hideInSearch: true,
                hideInTable: true,
                hideInAdded: true,
                hideInModify: true,
                width: 400,
            },
            {
                dataIndex: 'coverAttachmentUuid',
                title: '封面附件',
                valueType: 'upload',
                valueFile: [1],
                fileUrl: 'fileUrl',
                hideInTable: true,
            },
            {
                dataIndex: 'coverUrl',
                title: '封面附件',
                valueType: 'hidden',
                hideInSearch: true,
                hideInTable: true,
                hideInAdded: true,
                hideInModify: true,
                width: 400,
            },
        ],
    }
    return dataList
}
